DateDiff(datepart, date1, date2)


Returns the number of intervals in whole units of type Datepart by which Date1 is less than Date2.

See also DateAdd, DatePart, and CreateTimeSpan.

datepart

One of the following strings:

date1

Date/time object in the period from 100 AD to 9999 AD.

date2

Date/time object in the period from 100 AD to 9999 AD.